package com.yingxin.yxerp.module.message.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yingxin.yx.framework.mybatisplus.common.CommonEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * <p>
 * 用户消息
 * </p>
 *
 * @author fanchao
 * @since 2022-03-22
 */

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_user_message")
public class UserMessage extends CommonEntity {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId("id")
    private String id;

    /**
     * 用户 id
     */
    private String receiverId;

    /**
     * 用户 id
     */
    private String senderId;

    /**
     * 业务 id
     */
    private String businessId;

    /**
     * 业务类型
     */
    private String businessType;

    /**
     * 业务 no
     */
    private String businessNo;

    /**
     * 当前流程实例id
     */
    private String processInstanceId;

    /**
     * task id
     */
    private String taskId;

    /**
     * 消息类型
     */
    private String messageType;

    /**
     * 消息内容
     */
    private String messageContent;

    /**
     * 已读标记：0 未读 1 已读
     */
    private String readFlag;

    /**
     * 消息查看时间
     */
    private Date readTime;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 删除标记：0 正常 1 已删除
     */
    @TableLogic
    private String delFlag;

    public UserMessage() {
    }

    public UserMessage(String businessId, String businessNo, String businessType) {
        this.businessId = businessId;
        this.businessNo = businessNo;
        this.businessType = businessType;
    }

}
